{%extends "base.html"%}
{%block body%}
<h2>Create or Edit an Event</h2>

<!-- questions: {{questions}} -->

<!-- race: {{event.racedirector}}<br/>
user: {{user}}<br/> -->

<p>It is {% now "D Y-m-d T" %}</p>

<form action="{%url views.editevent event.key.id%}" method="post">
<br/><b>(* - Required)</b><br/>
<table class="sample">
{% for field in form %}

    <tr class="d0">
	<td><b><center>{{ field.label_tag }} 
		    {% if field.field.required %}*{% endif %}
	</center></b>
	<br/><center><div class="warn">{{ field.errors }}</div></center>
    </td>
    <td> 
	{{ field }} {{ field.help_text }}
	{% ifequal field.name "payment_company_id" %}
	<br/><div class="warn"><a href="http://checkout.brooklynmarathon.com/GET_VendorRecipientToken?returnURL=http://move.brooklynmarathon.com{%url views.editevent event.key.id%}&eventid={{event.key.id}}">Register for Amazon (production mode)</a></div>
	<br/><div class="warn"><a href="http://checkout-sandbox.brooklynmarathon.com/GET_VendorRecipientToken?returnURL=http://move.brooklynmarathon.com{%url views.editevent event.key.id%}&eventid={{event.key.id}}">Register for Amazon (test mode)</a></div>
	{% endifequal %}


    </td>
    </tr>
{% endfor %}

<tr><td><input type="submit" value="Save">&nbsp;
          <a class="wuz-ir" href="/listevent" >Cancel</a>
</td></tr>
</table>
</form>

<!-- is_admin: {{is_admin}} -->
<hr/>
<b>Recent Events</b> Click on the link to copy to current form<br/>
{{recent}}

{%endblock%}
